/**write in 2 file_descriptor*/
#include<errno.h>
#include<stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
int main(void)
{
	int fd1,fd2;
	fd1=open("test.txt",O_WRONLY | O_TRUNC | O_APPEND);
	if(-1==fd1){
		perror("open1 error");
		return 1;
	}
	fd2=open("test.txt",O_WRONLY | O_APPEND);
	if(-1==fd2){
		perror("open2 error");
		close(fd1);
		return 1;
	}
	write(fd1,"hello world\n",12);
	write(fd2,"abcd efgh\n",10);
	close(fd1);
	close(fd2)
}
